package engine.data;

import java.io.IOException;

import javax.microedition.lcdui.Image;

public final class People {

	public static final byte UNDEFINED = -1;

	public static final byte CONTENT = 0;

	public static final byte HAPPY = 1;

	public static final byte UNHAPPY = 2;

	public static final byte ARTIST = 3;

	public static final byte SCIENTIST = 4;

	public static final byte TAXMAN = 5;

	public static final byte SIZE = 6;

	public static final byte IMAGE_WIDTH = 8;

	public static final byte IMAGE_HEIGHT = 13;

	public byte id;

	public Image image;

	public People(final byte peopleId, final byte currIndex) throws IOException {
		this.id = peopleId;
		StringBuffer sb = new StringBuffer();
		sb.append("/images/people_");
		sb.append(this.id);
		if (this.id == CONTENT || this.id == HAPPY)
			sb.append("_").append(currIndex);
		sb.append(".png");
		this.image = Image.createImage(sb.toString());
	}

	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("People[id=").append(this.id).append("]");
		return sb.toString();
	}
}
